/**
* \file INetworkContext.h
* \brief INetworkContext decleration class
* \author Edouard ROGE
* \date 04 Novembre 2013
*/
#ifndef _INETWORKCONTEXT_
#define _INETWORKCONTEXT_

namespace Core
{
	namespace Network
	{
		class ITCPSocket;
		class ITCPServerSocket;
		class IUDPSocket;

		class INetworkContext
		{
		public:

			/**
			 * \fn virtual ITCPSocket * CreateTCPSocket() const = 0;
			 * \return Newly created connected socket (client side)
			 * \brief Create a connected socket (client side)
			 */
			virtual ITCPSocket * CreateTCPSocket() const = 0;

			/**
			 * \fn void DestroyTCPSocket(ITCPSocket * _pSocket) const = 0;
			 * \param Connected Socket to destroy, previsouly created by this context
			 * \brief Destroy a connected socket
			 */
			virtual void DestroyTCPSocket(ITCPSocket * _pSocket) const = 0;

			/**
			 * \fn virtual ITCPServerSocket * CreateTCPServerSocket() const = 0;
			 * \return Newly created connected socket (server side)
			 * \brief Create a connected socket (server side)
			 */
			virtual ITCPServerSocket * CreateTCPServerSocket() const = 0;

			/**
			 * \fn void DestroySocket(ISocket * _pSocket) const = 0;
			 * \param Connected Socket (server side) to destroy, previsouly created by this context
			 * \brief Destroy a connected socket (server side)
			 */
			virtual void DestroyTCPServerSocket(ITCPServerSocket * _pSocket) const = 0;

			/**
			 * \fn virtual IUDPSocket * CreateUDPSocket() const = 0;
			 * \return Newly created non-connected socket
			 * \brief Create a non-connected socket
			 */
			virtual IUDPSocket * CreateUDPSocket() const = 0;

			/**
			 * \fn virtual void DestroyUDPSocket(IUDPSocket * _pSocket) const = 0;
			 * \param Non-connected socket to destroy, previsouly created by this context
			 * \brief Destroy a non-connected socket
			 */
			virtual void DestroyUDPSocket(IUDPSocket * _pSocket) const = 0;
		};
	}
}

#endif // _INETWORKCONTEXT_
